package com.example.provider;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * 
 * @author Gao
 * @date 2021/7/15
 */
@RestController
public class ConsumerController {

    @Autowired
    private FeignClientService feignClientService;

    @Autowired
    private FtsFeignClientService ftsFeignClientService;

    @RequestMapping(value = "/test/{str}", method = RequestMethod.GET)
    public String test(@PathVariable String str) {
        System.out.println("通过consumer调用provider服务的方法");
        return feignClientService.test(str);
    }

    @RequestMapping(value = "/test2/{str}", method = RequestMethod.GET)
    public String test2(@PathVariable String str) {
        System.out.println("通过consumer调用provider服务的方法");
        return ftsFeignClientService.test(str);
    }
}
